# Contributor: Anjandev Momi <anjan@momi.ca>
# Maintainer: Anjandev Momi <anjan@momi.ca>
pkgname=limnoria
pkgver=20240828
_pkgver=2024-08-28
pkgrel=0
pkgdesc="A robust, full-featured, and user/programmer-friendly Python IRC bot, with many existing plugins"
url="https://limnoria.net/"
arch="noarch"
license="BSD-3-Clause"
depends="python3 py3-cryptography"
makedepends="py3-setuptools py3-gpep517"
checkdepends="py3-feedparser tzdata"
subpackages="$pkgname-doc $pkgname-pyc"
source="https://github.com/progval/Limnoria/archive/refs/tags/master-$_pkgver.tar.gz
	fix-tests.patch
	"
builddir="$srcdir/Limnoria-master-$_pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	gpep517 install-wheel --destdir .testenv --prefix '' .dist/*.whl
	.testenv/bin/python3 -m supybot.scripts.limnoria_test test -v --plugins-dir=./plugins/ --no-network
}

package() {
	gpep517 install-wheel --destdir "$pkgdir" \
		.dist/*.whl
}

sha512sums="
fd49716f939581bde628abc6748577e0366f3a03df6f727ba83653d7d4e14072d54e030060b62a4d7e2843d6fae438a63058c74780151499dfcc25669bfbdd68  master-2024-08-28.tar.gz
1f9bf7a469eba00c843208af233a175450ca31756193559c7b0f8abf0dffdd39df95235ebc4da2e15c278ca606c634b3b77ec8f44d340ce74ef168dd40944ab4  fix-tests.patch
"
